package com.revenco.bi.controller.basecontroller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;

public abstract class Exceptions {

	@ExceptionHandler(Exception.class)
	@ResponseStatus(HttpStatus.OK)
	public Map<String,String> handleException(Exception e, HttpServletRequest request){
		System.out.println(e);
		Map<String, String> result = new HashMap<String, String>();
		result.put("error", "错误信息");
		return result;
	}
}
